Make gtk_icon_theme_load_icon() work independent of icon factory
authorMatthias Clasen <mclasen@redhat.com>
Mon, 3 Jan 2005 14:44:33 +0000 (14:44 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Mon, 3 Jan 2005 14:44:33 +0000 (14:44 +0000)
2005-01-03  Matthias Clasen  <mclasen@redhat.com>

Make gtk_icon_theme_load_icon() work independent of
icon factory initialization.  (#162791, Tristan Van Berkom)

* gtk/gtkiconfactory.[hc]: Rename ensure_default_icons to
_gtk_icon_factory_ensure_default_icons, and make it non-static.

* gtk/gtkicontheme.c (find_builtin_icon): ..and call it here.

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkiconfactory.c
gtk/gtkiconfactory.h
gtk/gtkicontheme.c

index 50b92bfa4c7fc76ee787c4bbea82a75afa1db795..06bcd912529684c779bfd528e04d7737e4f2d3ca 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2005-01-03  Matthias Clasen  <mclasen@redhat.com>
+
+       Make gtk_icon_theme_load_icon() work independent of
+       icon factory initialization.  (#162791, Tristan Van Berkom)
+       
+       * gtk/gtkiconfactory.[hc]: Rename ensure_default_icons to
+       _gtk_icon_factory_ensure_default_icons, and make it non-static.
+
+       * gtk/gtkicontheme.c (find_builtin_icon): ..and call it here.
+
 2005-01-02  Matthias Clasen  <mclasen@redhat.com>
 
        * gtk/gtkfilechooserbutton.c (gtk_file_chooser_button_remove_shortcut_folder): 
index 50b92bfa4c7fc76ee787c4bbea82a75afa1db795..06bcd912529684c779bfd528e04d7737e4f2d3ca 100644 (file)
@@ -1,3 +1,13 @@
+2005-01-03  Matthias Clasen  <mclasen@redhat.com>
+
+       Make gtk_icon_theme_load_icon() work independent of
+       icon factory initialization.  (#162791, Tristan Van Berkom)
+       
+       * gtk/gtkiconfactory.[hc]: Rename ensure_default_icons to
+       _gtk_icon_factory_ensure_default_icons, and make it non-static.
+
+       * gtk/gtkicontheme.c (find_builtin_icon): ..and call it here.
+
 2005-01-02  Matthias Clasen  <mclasen@redhat.com>
 
        * gtk/gtkfilechooserbutton.c (gtk_file_chooser_button_remove_shortcut_folder): 
index 50b92bfa4c7fc76ee787c4bbea82a75afa1db795..06bcd912529684c779bfd528e04d7737e4f2d3ca 100644 (file)
@@ -1,3 +1,13 @@
+2005-01-03  Matthias Clasen  <mclasen@redhat.com>
+
+       Make gtk_icon_theme_load_icon() work independent of
+       icon factory initialization.  (#162791, Tristan Van Berkom)
+       
+       * gtk/gtkiconfactory.[hc]: Rename ensure_default_icons to
+       _gtk_icon_factory_ensure_default_icons, and make it non-static.
+
+       * gtk/gtkicontheme.c (find_builtin_icon): ..and call it here.
+
 2005-01-02  Matthias Clasen  <mclasen@redhat.com>
 
        * gtk/gtkfilechooserbutton.c (gtk_file_chooser_button_remove_shortcut_folder): 
index 50b92bfa4c7fc76ee787c4bbea82a75afa1db795..06bcd912529684c779bfd528e04d7737e4f2d3ca 100644 (file)
@@ -1,3 +1,13 @@
+2005-01-03  Matthias Clasen  <mclasen@redhat.com>
+
+       Make gtk_icon_theme_load_icon() work independent of
+       icon factory initialization.  (#162791, Tristan Van Berkom)
+       
+       * gtk/gtkiconfactory.[hc]: Rename ensure_default_icons to
+       _gtk_icon_factory_ensure_default_icons, and make it non-static.
+
+       * gtk/gtkicontheme.c (find_builtin_icon): ..and call it here.
+
 2005-01-02  Matthias Clasen  <mclasen@redhat.com>
 
        * gtk/gtkfilechooserbutton.c (gtk_file_chooser_button_remove_shortcut_folder): 
index ceec68cb504fc12d32a3ab79566faaec8ab96d1f..74be267e845896dfa1a25d007e020934d3de2186 100644 (file)
@@ -304,8 +304,8 @@ gtk_icon_factory_remove_default (GtkIconFactory  *factory)
   g_object_unref (factory);
 }
 
-static void
-ensure_default_icons (void)
+void
+_gtk_icon_factory_ensure_default_icons (void)
 {
   if (gtk_default_icons == NULL)
     {
@@ -348,7 +348,7 @@ gtk_icon_factory_lookup_default (const gchar *stock_id)
       tmp_list = g_slist_next (tmp_list);
     }
 
-  ensure_default_icons ();
+  _gtk_icon_factory_ensure_default_icons ();
   
   return gtk_icon_factory_lookup (gtk_default_icons, stock_id);
 }
@@ -2938,7 +2938,7 @@ _gtk_icon_factory_list_ids (void)
 
   ids = NULL;
 
-  ensure_default_icons ();
+  _gtk_icon_factory_ensure_default_icons ();
   
   tmp_list = all_icon_factories;
   while (tmp_list != NULL)
index 43c90a30bc6993419cceec7ca9e3627f8302ab04..79e6ffecccc0016528546830986bf79bfe4efcb1 100644 (file)
@@ -180,6 +180,7 @@ GtkIconSize      gtk_icon_source_get_size                 (const GtkIconSource *
 /* ignore this */
 void _gtk_icon_set_invalidate_caches (void);
 GSList* _gtk_icon_factory_list_ids (void);
+void _gtk_icon_factory_ensure_default_icons (void);
 
 #ifdef __cplusplus
 }
index 86704f45d32c8f5356766cdce199f78d3db1033e..ca6ef338f3ec19b1e5317c56aa8e3c324329e0fd 100644 (file)
@@ -37,6 +37,7 @@
 #endif /* G_OS_WIN32 */
 
 #include "gtkicontheme.h"
+#include "gtkiconfactory.h"
 #include "gtkiconcache.h"
 #include "gtkintl.h"
 #include "gtksettings.h"
@@ -2872,6 +2873,8 @@ find_builtin_icon (const gchar *icon_name,
   gboolean has_larger = FALSE;
   BuiltinIcon *min_icon = NULL;
   
+  _gtk_icon_factory_ensure_default_icons ();
+  
   if (!icon_theme_builtin_icons)
     return NULL;